package com.yy.wga.mp.module.promoter.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class EPromoter {

    @Getter
    @AllArgsConstructor
    public static enum BindStatus {
        UN_BIND(0, "未绑定"),
        BIND(1, "已绑定"),
        ;

        private final Integer type;
        private final String message;

        public static boolean isBind(Integer bindStatus) {
            return Objects.equals(BIND.type, bindStatus);
        }
    }


    @Getter
    @AllArgsConstructor
    public static enum RegisterStatus {
        UN_REGISTER(0, "未注册"),
        REGISTERING(1, "注册中,未完成"),
        REGISTER(2, "已注册"),
        NEED_REAL_NAME(3, "用户未实名,需完成实名才能注册");

        private final Integer type;
        private final String message;

        public static Boolean needInvokeRegisterProcess(Integer registerStatus) {
            List<Integer> unRegisterLisrt = Arrays.asList(UN_REGISTER.type, REGISTERING.type);
            if (unRegisterLisrt.contains(registerStatus)) {
                return true;
            }
            return false;
        }

        public static Boolean isRegister(Integer registerStatus) {
            return Objects.equals(REGISTER.type, registerStatus);
        }
    }

    @Getter
    @AllArgsConstructor
    public static enum PromoterStatus {
        REGISTER_AND_BIND(0, "已注册且已绑定"),
        UN_REGISTER(1, "未注册"),
        UN_BIND(2, "未绑定"),
        OTHER(3, "其他信息"),
        ;

        private final Integer type;
        private final String message;
    }
}
